%Beta OLS estimation
function [betaOLS]  = BetaOLS(rStock,rIndex)
    [n,m] = size(rStock);
    X = [rIndex];
    y = rStock;
    %QR Decomposition X
    [Q,R] = qr(X,0);
    %Regression Coefficients 
    betaOLS = R\(Q'*y);
end